package com.shop.cereshop.commons.domain.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 点赞操作结果
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LikeResult {
    
    /**
     * 是否点赞成功（true: 点赞, false: 取消点赞）
     */
    private Boolean liked;
    
    /**
     * 当前点赞总数
     */
    private Long totalCount;
    
    /**
     * 操作描述
     */
    private String message;
    
    public LikeResult(Boolean liked, Long totalCount) {
        this.liked = liked;
        this.totalCount = totalCount;
        this.message = liked ? "点赞成功" : "取消点赞成功";
    }
}
